package hibernate.roomSystem;

public class Speciality {
	private String name;
	private Speciality(String n){
		name=n;
	}
	public String toString(){
		return name;
	}
	
	private static Speciality HANDICAPPED_ROOM=new Speciality("HANDICAPPED_ROOM");
	private static Speciality NO_SMOKE=new Speciality("NO_SMOKE");
	private static Speciality WITH_KITCHEN=new Speciality("WITH_KITCHEN");
	
	public static Speciality getInstance(String s){
		if(s.equals("HANDICAPPED_ROOM"))
			return HANDICAPPED_ROOM;
		else if(s.equals("NO_SMOKE"))
			return NO_SMOKE;
		else if(s.equals("WITH_KITCHEN"))
			return WITH_KITCHEN;
		else 
			throw new java.lang.IllegalArgumentException("no this speciality");
	}

}
